#ifndef XWINDOWMANAGER_H
#define XWINDOWMANAGER_H

#include <QObject>
#include <QList>
#include <QWidget>

#ifndef _WIN32

#include <QX11Info>
//#include <QtGlobal>
//#include <QtX11Extras/QX11Info>

//#include <X11/extensions/shape.h>
//#include <X11/Xatom.h>
//#include <X11/Xlib.h>

//#include <QLibrary>
//#include <X11/Xutil.h>
#include <QStringList>

#define QXT_VERSION 0x000700
#define QXT_VERSION_STR "0.7.0"


#define WindowList QList<WId>

#endif

class XWindowManager : public QObject
{
public:
    explicit XWindowManager(QObject *parent = nullptr);

#ifndef _WIN32
    static WindowList windows();
    static WId activeWindow();
    static WId findWindow(const QString& title);
    static WId windowAt(const QPoint& pos);
    static QString windowTitle(WId window);
    static QStringList windowTitles();
    static QRect windowGeometry(WId window);

    static void windowShow(WId wid);
    static void windowHide(WId wid);

//    static uint idleTime();

    static void setStayOnTop(int wid, bool top);
    static void showFullscreenWindow(int wid, bool fullscreen);
    static void showMaximizedWindow(int wid, int state);
    static void showMinimizedWindow(int wid, bool minimized);
    static void changeWinDesktop(int winId, bool b);
#endif

    static bool getSystemFirststartup();
    static void setSystemFirststartupFalse();
    static void exitGreeterProgram();
    static void closeSystemConfig();
    static void closeSystemConfigBlocked();
    static void showSystemConfig();
    static void showSystemConfigEx();
    static void showSystemReboot();
    static void showSystemConfigWifi();
    static void showSystemConfigWifiEx();
    static void showSystemTaskbar();
    static void hideSystemTaskbar();
    static void enableSystemWin();
    static void disableSystemWin();
    static void disableSystemWinEx();
    static void disableSystemCloseActive();
    static void disableSystemScreenSleepactive();
    static void enableSystemScreenSleepactive();
    static void windowSystemSleep();
    static void windowSystemReboot();
    static void windowSystemShutdown();

};

#endif // XWINDOWMANAGER_H
